﻿<%@ Page Language="C#" MasterPageFile="~/StreetCenter/StreetMaster.master" AutoEventWireup="true" CodeFile="Search.aspx.cs" Inherits="StreetCenter_Search" Title="街道办事处管理后台" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table align="center" border="0" cellpadding="0" cellspacing="0" width="95%">
        <tr>
            <td bgcolor="#d5f3ff" style="height: 65px">
                <table align="center" border="0" cellpadding="0" cellspacing="0" width="60%">
                    <tr>
                        <td height="32">
                            <img height="30" src="../Images/Main_13.jpg" width="73" /></td>
                        <td>
                            关键字：</td>
                        <td>
                            <asp:TextBox ID="txbcontent" runat="server"></asp:TextBox></td>
                        <td>
                            搜索范围：</td>
                        <td style="width: 55px">
                            <asp:DropDownList ID="ddlsearch" runat="server">
                                <asp:ListItem>编号</asp:ListItem>
                                <asp:ListItem>姓名</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td>
                            <asp:Button ID="btnsearch" runat="server" OnClick="btnsearch_Click" Text="搜索" /></td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <br />
    <table align="center" border="0" cellpadding="0" cellspacing="0" width="95%">
        <tr>
            <td style="height: 12px">
                <asp:GridView ID="gvshowbysearch" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                    CssClass="GridViewStyle" EmptyDataText="列表为空" OnRowCommand="gvshowbysearch_RowCommand"
                    OnRowDataBound="gvshowbysearch_RowDataBound" PageSize="15" Width="100%">
                    <Columns>
                        <asp:TemplateField HeaderText="编号">
                            <ItemTemplate>
                                <%#string.IsNullOrEmpty(Eval("apply_longid").ToString())?Eval("apply_noid"):Eval("apply_longid")%>
                            </ItemTemplate>
                            <ItemStyle Width="20%" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="详情">
                            <ItemTemplate>
                                申请人：<%#(Eval("apply_name"))%>
                                &nbsp; &nbsp; 申请时间：<%#Convert.ToDateTime(Eval("apply_time")).ToString("yyyy年MM月dd日")%>
                                <br />
                                地址:<%#Eval("apply_address") %>
                            </ItemTemplate>
                            <ItemStyle Width="40%" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="状态">
                            <ItemTemplate>
                                <%#GetSituation(Eval("apply_checkstate").ToString(), Eval("apply_passed").ToString())%>
                            </ItemTemplate>
                            <ItemStyle Width="25%" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="查看详细信息">
                            <ItemTemplate>
                                <asp:HyperLink ID="hlkview" Target="_blank" NavigateUrl='<%# "../PublicContent/ViewApply.aspx?applyid="+Eval("apply_id")+"&id="+Eval("apply_noid") %>' runat="server">查看</asp:HyperLink>
                            </ItemTemplate>
                            <ItemStyle Width="30%" />
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle CssClass="FooterStyle" />
                    <RowStyle CssClass="RowStyle" />
                    <EmptyDataRowStyle CssClass="EmptyRowStyle" />
                    <PagerStyle CssClass="PagerStyle" />
                    <SelectedRowStyle CssClass="SelectedRowStyle" />
                    <HeaderStyle CssClass="HeaderStyle" />
                    <EditRowStyle CssClass="EditRowStyle" />
                    <AlternatingRowStyle CssClass="AltRowStyle" />
                    <PagerSettings Visible="False" />
                </asp:GridView>
                <div style="font-size: 15px; text-align: center">
                    <br />
                    <asp:Button ID="btnfirstpage" runat="server" OnClick="btnfirstpage_Click" Text="首页" />
                    <asp:Button ID="btnprepage" runat="server" OnClick="btnprepage_Click" Text="上一页" />
                    <asp:Button ID="btnnextpage" runat="server" OnClick="btnnextpage_Click" Text="下一页" />
                    <asp:Button ID="btnlastpage" runat="server" OnClick="btnlastpage_Click" Text="尾页" />&nbsp;
                    转跳到：<asp:DropDownList ID="ddlpages" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlpages_SelectedIndexChanged">
                    </asp:DropDownList>
                    <br />
                    <br />
                </div>
            </td>
        </tr>
    </table>
</asp:Content>

